#include <stdio.h>

int main(int argc, char *argv[]) {

    int n = 0;
    scanf("%d", &n);

    for (size_t i = 0; i < n; i++)
    {
        int s = 0, sum = 3;
        scanf("%d", &s);
        for (size_t i = 0; i < s; i++)
        {
            sum -= 1;
            sum *= 2;
        }

        printf("%d\n", sum);
    }
    

    return 0;
}